<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3种图表类型</title>
    <script src="./js/echarts.min.js"></script>
</head>
<body>
    <div id="app" style="width:1200px;height:800px;border:1px solid #999"></div>
    <script>
        var myechart = echarts.init(document.getElementById("app"))
        var option = {
            title:{
                text:"第一个文档",
                left:"center",
                top:30,
                subtext:'中国好chart',
                textStyle:{fontSize:28}
            },
            tooltip:{triger:"item"},
            legend:{
                data:["js",'vue',"html","css","jq","选择器"],
                left:'right'
            },
            xAxis:{
                data:["一期","二期","三阶段","四","五"]
            },
            yAxis:{},
            series:[
                {name:'js',type:'bar',data:[65,80,70,80,59]},
                {name:'vue',type:'line',data:[20,50,95,89,55]},
                {name:'html',type:'line',smooth:true,data:[58,70,60,89,54]},
                {name:'css',type:'line',smooth:true,areaStyle:{color:"pink"},data:[30,40,50,30,60]},
                {
                    name:"jq",
                    type:"pie",
                    radius:[100,50],
                    left:-600,
                    top:-500,
                    data:[{name:"选择器",value:50},{name:"dom",value:20},{name:"动画",value:40},{name:"ajax",value:30}]
                }
            
            ]
        }
        myechart.setOption(option);
        // type图表类型：
        // bar 柱状图
        // line 折线图  smmoth:true 曲线图   areaStyle 面积
        // pie 饼形图   radius:[100,50]  环形图
    </script>
</body>
</html>